<form action="?page_view=addView&action=save" method="post">
    <div class="form-group">
        <label for="project_name">项目名称</label>
        <input type="text" required="required" class="form-control" id="vote_name" name="vote_name" placeholder="投票展示的名称">
    </div>
    <div class="form-group">
        <label for="vote_image">项目LOGO</label>
        <input type="text" class="form-control" name="vote_image" id="vote_image" placeholder="图片地址" required="required">
    </div>
    <div class="form-group">
        <label for="project_id">所属投票</label>
        <select class="form-control" name="project_id" id="project_id" required="required">
            <option value="">请选择所属投票项</option>
            <?php foreach ($pro_list as $p): ?>
                <option value="<?= $p['project_id'] ?>"><?= $p['project_name'] ?></option>
            <?php endforeach; ?>
        </select>
    </div>

    <div class="form-group">
        <label>项目简介</label>
        <div>
            <textarea name="vote_desc" id="editor" style="width: 100%;height:200px;"></textarea>
        </div>
    </div>
    <button type="submit" class="btn btn-default">Submit</button>
</form>


<script type="text/javascript" charset="utf-8" src="<?php echo getResourceUrl()?>/res/assets/editor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<?php echo getResourceUrl()?>/res/assets/editor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="<?php echo getResourceUrl()?>/res/assets/editor/lang/zh-cn/zh-cn.js"></script>
<script>
    var ue = UE.getEditor('editor');
</script>
